FROM p4lang/behavioral-model@sha256:ce45720e28a96a50f275c1b511cd84c2558b62f2cf7a7e506765183bc3fb2e32
## FROM docker-config-engine-bookworm-{{DOCKER_USERNAME}}:{{DOCKER_USERTAG}}

## Make apt-get non-interactive
ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update

RUN apt-get install -f -y net-tools supervisor rsyslog  python3-pip
RUN pip3 install supervisord-dependent-startup

COPY ["start.sh", "/usr/bin/"]

## COPY ["supervisord.conf", "/etc/supervisor/conf.d/"]
## COPY ["files/supervisor-proc-exit-listener", "/usr/bin"]
## COPY ["critical_processes", "/etc/supervisor/"]

## Clean up
RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y
RUN rm -rf /debs

## ENTRYPOINT ["/usr/bin/supervisord"]
ENTRYPOINT ["/usr/bin/start.sh"]
